package io.renren.utils;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;

public class Pageable {

    @ApiModelProperty(value = "页码", example = "1")
    private Long page = 1L;

    @ApiModelProperty(value = "行数", example = "10")
    private Long size = 10L;

    public Long getPage() {
        return page;
    }

    public void setPage(Long page) {
        this.page = page;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public <T> Page<T> toPage() {
        return new Page<>(this.page, this.size);
    }
}